/**
 * Created by Administrator on 2018/7/23.
 */
$(document).ready(function () {
    $("#banner").slide({
        titCell: ".hd ul li",
        mainCell: ".bd ul",
        mouseOverStop: true,
        effect: "fold",
        trigger: "click",
        autoPlay: true,
        interTime: 7000,
        delayTime: 250
    })
    var options = {
        useEasing: true,
        useGrouping: true,
        separator: '',
        decimal: '',
        prefix: '',
        suffix: ''
    };
    var demo = new CountUp("numll1", 0, 10000, 0, 2.5, options);
    var demo2 = new CountUp("numll2", 0, 60, 0, 2.5, options);
    var demo3 = new CountUp("numll3", 0, 10, 0, 2.5, options);
    var demo4 = new CountUp("numll4", 0, 24, 0, 2.5, options);
    var demo5 = new CountUp("numll5", 0, 1000, 0, 2.5, options);
    demo.start();
    demo2.start();
    demo3.start();
    demo4.start();
    demo5.start();
    //案列切换
    $("#Caseslider").slide({
        effect: "left",
        trigger: "click"
    });
    //解决方案切换
    $(".Solution").slide({
        mainCell: "#Soluul",
        effect: "left",
        vis: 4,
        pnLoop: true,
        scroll: 1,
        autoPage: true,
        // autoPlay: true,
        // interTime: 3000,
    });
})

$(function () {
    var Li = $('.people-table .hd ul li');
    //var bd = $('.people-table .bd ul ');
    var index = 0;
    var timer = null;

    function run() {
        index++;
        if (index == 3) {
            index = 0;
        }
        Li.eq(index).addClass('on').siblings().removeClass('on');
        // bd.eq(index).show().siblings().hide();
        $(".peoplebox").children('div').eq(index).addClass('activePeo')
        $(".peoplebox").children('div').eq(index).siblings().removeClass('activePeo')
    }

    for (var i = 0; i < Li.length; i++) {
        Li[i].index = i; //给每个li定义一个属性索引值，赋
        Li[i].onclick = function () {
            index = this.index; //    索引值从0开始
            Li.eq(index).addClass('on').siblings().removeClass('on');
            //bd.eq(index).show().siblings().hide();
            $(".peoplebox").children('div').eq(index).addClass('activePeo')
            $(".peoplebox").children('div').eq(index).siblings().removeClass('activePeo')
            clearInterval(timer);
            timer = setInterval(run, 7000)
        }
    }
    timer = setInterval(run, 7000)
})